package com.fjc.dao;

import com.fjc.domain.SysUserPermission;
import com.fjc.domain.SysUserPermissionExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
@Mapper
public interface SysUserPermissionMapper {
    long countByExample(SysUserPermissionExample example);

    int deleteByExample(SysUserPermissionExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(SysUserPermission record);

    int insertSelective(SysUserPermission record);

    List<SysUserPermission> selectByExample(SysUserPermissionExample example);

    SysUserPermission selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") SysUserPermission record, @Param("example") SysUserPermissionExample example);

    int updateByExample(@Param("record") SysUserPermission record, @Param("example") SysUserPermissionExample example);

    int updateByPrimaryKeySelective(SysUserPermission record);

    int updateByPrimaryKey(SysUserPermission record);

    List<Map> selectParentMenuByUserid(Integer userid);

    List<Map> selectChildrenMenuByUserid(@Param("userid") Integer userid,@Param("parentid") Integer parentid);

    List<Map> selectNoDelPermissionByUserid(Integer userid);

    List<Integer> selectAllPermissionByUserid(Integer userid);

    List<Map> selectParentIsNotNull(Integer userid);
}